<?php
/**
Description: This is the config file for the contentdm2flickr tool. More details in the Wiki for this tool.
Copyright (C) 2011  VCU Libraries

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see http://www.gnu.org/licenses/

*/

define('CDM_URL','http://dig.library.vcu.edu/');
define('OAI_URL',CDM_URL.'cgi-bin/oai.exe');
define('OAI_METADATAPREFIX','oai_dc');
define('CDM_THUMBNAIL_URL', CDM_URL.'cgi-bin/thumbnail.exe');
define('CDM_IMAGE_URL', CDM_URL.'cgi-bin/getimage.exe');
define('FLICKR_API_KEY','<FLICKR API KEY GOES HERE>');
define('FLICKR_SECRET','<FLICKR SECRET KEY GOES HERE>');
define('FLICKR_TOKEN','<FLICKR TOKEN GOES HERE>');
define('STD_TAGS','VCU Libraries, VCU digital collections,');
define('TOOL_HOME_PAGE', CDM_URL.'flickrdev/CONTENTdm2Flickr.php');


$stopwords = array (', etc.');
//description line item pattern
$desc_line_item_pattern = "<b>%key%</b>: %value%\n\n";

// the pictures in the collections listed below would be loaded on the Flickr Uploader page
// rest would be left out as the listings and picture loading take a lot of time.
// the full list is mentioned here: car, com, cmh, pec, fff, mcv, rpi, jwh, mar, nur, psm, 
// postcard, rca, rcp, rhr, san, cook, bov, ohi, voices, wcr, mar, jwh, psm

// Filters the item records under a collection based on a regex pattern
// in the case below all records with description = Joe's Dope Sheet 
// OR title = cover1 would be picked to be displayed on the screen
$manipulate_data 
= array ( 
	'psm' => array 
		( 
		array 
			(
			'filter_rules' => array 
				(
					"dc:description" => "/^Joe's Dope Sheet/" 
				),
			'mapping_rules' =>  array 
				( 
					"Title" => "Joe's Dope Sheet (%dc:title%)", 
					"Creator and Illustrator" => "%dc:creator,1%; %dc:creator,0%",
					"Rights" => "<a href=\"%dc:rights%\">%dc:rights%</a>",
					"Collection" => "<a href=\"%dc:identifier,/^http:\/\/.*/%\">%dc:source%</a>"
				)
			),
		array 
			(
			'filter_rules' => array 
				(
					"dc:title" => "/^cover1/"
				),
			'mapping_rules' => array 
				( 
					"Title" => "PS Magazine Cover page", 
					"Creator and Illustrator" => "%dc:creator,1%; %dc:creator,0%",
					"Rights" => "<a href=\"%dc:rights%\">%dc:rights%</a>",
					"Collection" => "<a href=\"%dc:identifier,/^http:\/\/.*/%\">%dc:source%</a>"
				)
			)

		),
	'jwh' => array
	 	( 
		array 
			(
			'filter_rules' => array 
				(
					"dc:format" => "/^Black and white photograph/"
				),
			'mapping_rules' =>  array 
				( 
					"Address/Title" => "%dc:title%", 
					"Photographer" => "%dc:creator,1%",
					"Original Description (from Book)" => "%dc:description,0%",
					"City/Location" => "%dc:coverage%",
					"Date of photograph" => "%dc:date,/^ca\./%",
					"Map URL" => "%dc:description,/^http:\/\/.*/%",
					"Original Publication" => "%dc:source,0%",
					"Rights" => "<a href=\"%dc:rights%\">%dc:rights%</a>",
					"Permanent Link" => "<a href=\"%dc:identifier,99999%\">%dc:identifier,99999%</a>",
					"Collection" => "<a href=\"%dc:identifier,99999%\">%dc:source,1%</a>"
				),
			'special_rules' => array
				(
				 	"GeoTag"	=> "%dc:description,/^[0-9]*\.[0-9]*[,]?[+]?[-][0-9]*\.[0-9]*/%",
					"DateTag" => "%dc:date,/^ca\./%"
				)
			)
		),
	'mar' => array
	 	( 
		array 
			(
			'mapping_rules' =>  array 
				( 
					"Description(Physical Details)" => "%dc:description,2%", 
					"Manufacturer" => "%dc:creator%",
					"Date of Manufacture" => "%dc:date%",
					"Rights" => "<a href=\"%dc:rights%\">%dc:rights%</a>",
					"Collection" => "<a href=\"%dc:identifier,/^http:\/\/.*/%\">%dc:source%</a>",
					"Reference URL" => "<a href=\"%dc:identifier,/^http:\/\/.*/%\">%dc:identifier,/^http:\/\/.*/%</a>"
				)
			)
		),
		'rhr' => array ('filter_rules' => array ())


);
?>
													